Skip to content

Extend Network resource to use custom templates#121

Open
jgomezve wants to merge 1 commit intoCiscoDevNet:masterfrom
jgomezve:jg-network-resource-custom-template
Open

Extend Network resource to use custom templates#121
jgomezve wants to merge 1 commit intoCiscoDevNet:masterfrom
jgomezve:jg-network-resource-custom-template

Conversation

@jgomezve
Copy link
Copy Markdown

@jgomezve jgomezve commented Feb 2, 2023

Fix #111

if err != nil {
return err
if networkConfig, ok := d.GetOk("template_props"); ok {
networkConfigMap := networkConfig.(map[string]interface{})
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we should assign the values in the key template_props directly without any further verification. I would argue that users setting the key template_props must be completely sure that the JSON payload is built based on those values without further verification

Maybe we should only check if the VLAN ID and the Multicast group are part of the keys. If not we generate them. What are your thoughts?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think having a check to ensure the template_props are verified is a good step to add. Yes, i think VLAN ID and multicast group are a good start. I'll think more about what other parameters are important.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support VRF and Networks using custom templates

2 participants